package com.monitor.system.service.impl;

import java.util.List;
import com.monitor.common.utils.DateUtils;
import com.monitor.common.utils.StringUtils;
import com.monitor.system.domain.vo.LogInspectionVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.monitor.system.mapper.LogInspectionMapper;
import com.monitor.system.domain.LogInspection;
import com.monitor.system.service.ILogInspectionService;

/**
 * 日志巡检Service业务层处理
 * 
 * @author monitor
 * @date 2024-06-06
 */
@Service
public class LogInspectionServiceImpl implements ILogInspectionService 
{
    @Autowired
    private LogInspectionMapper logInspectionMapper;

    /**
     * 查询日志巡检
     * 
     * @param id 日志巡检主键
     * @return 日志巡检
     */
    @Override
    public LogInspection selectLogInspectionById(Long id)
    {
        return logInspectionMapper.selectLogInspectionById(id);
    }

    /**
     * 查询日志巡检列表
     * 
     * @param logInspection 日志巡检
     * @return 日志巡检
     */
    @Override
    public List<LogInspection> selectLogInspectionList(LogInspection logInspection)
    {
        return logInspectionMapper.selectLogInspectionList(logInspection);
    }

    /**
     * 新增日志巡检
     * 
     * @param logInspection 日志巡检
     * @return 结果
     */
    @Override
    public int insertLogInspection(LogInspection logInspection)
    {
        logInspection.setCreateTime(DateUtils.getNowDate());
        return logInspectionMapper.insertLogInspection(logInspection);
    }

    /**
     * 修改日志巡检
     * 
     * @param logInspection 日志巡检
     * @return 结果
     */
    @Override
    public int updateLogInspection(LogInspection logInspection)
    {
        logInspection.setUpdateTime(DateUtils.getNowDate());
        return logInspectionMapper.updateLogInspection(logInspection);
    }

    /**
     * 批量删除日志巡检
     * 
     * @param ids 需要删除的日志巡检主键
     * @return 结果
     */
    @Override
    public int deleteLogInspectionByIds(Long[] ids)
    {
        return logInspectionMapper.deleteLogInspectionByIds(ids);
    }

    /**
     * 删除日志巡检信息
     * 
     * @param id 日志巡检主键
     * @return 结果
     */
    @Override
    public int deleteLogInspectionById(Long id)
    {
        return logInspectionMapper.deleteLogInspectionById(id);
    }

    /**
     * 查询日志巡检列表(包含部门信息)
     *
     * @param logInspection 日志巡检
     * @return 日志巡检
     */
    @Override
    public List<LogInspection> selectLogInspectionDeptList(LogInspectionVo logInspection)
    {
        List<LogInspection> list = logInspectionMapper.selectLogInspectionDeptList(logInspection);
        return list;
    }

    /**
     * 数据恢复列表
     *
     * @param logInspection 日志巡检
     * @return 日志巡检
     */
    @Override
    public List<LogInspection> selectLogInspectionDataList(LogInspectionVo logInspection)
    {
        // 传extend1,id,dataCenter
        List<LogInspection> list = logInspectionMapper.selectIdNotInList(logInspection);
        return list;
        }

}
